home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 8 / Night Owl CD-ROM (NOPV8) (Night Owl Publisher) (1993).ISO / 034a / aecur101.arj / CONTRIB / CURSES / SRC / MVWIN.C < prev    next >
C/C++ Source or Header  |  1990-03-08  |  524b  |  27 lines

  1. /*------------------------------------------------------------
  2.  * 
  3.  *  mvwin.c
  4.  * 
  5.  *  copyright (c) 1987,88,89,90 J. Alan Eldridge
  6.  *
  7.  *  move a window on the screen, if it fits
  8.  * 
  9.  *----------------------------------------------------------*/
  10.  
  11. #include "curses.h"
  12.  
  13. int
  14. mvwin(win, y, x)
  15. WINDOW  *win;
  16. int     y, x;
  17. {
  18.     if (win->maxy + y < LINES && win->maxx + x < COLS) {
  19.         win->orgy = y;
  20.         win->orgx = x;
  21.         touchwin(win);
  22.         return OK;
  23.     } else
  24.         return ERR;
  25. }
  26.  
  27.